package com.sync.utils.project.demo.pojo;

import com.baomidou.mybatisplus.core.metadata.IPage;

import java.io.Serializable;
import java.util.List;

/**
 * TODO
 *
 * @Author YWF
 * @Date 2023/4/4 11:31
 */
public class PageView<T> implements Serializable {

    private List<T> rows;

    //总条数
    private long total;

    //总页数
    private long pages;

    public PageView(IPage page) {
        this.rows = page.getRecords();
        this.total = page.getTotal();
        this.pages = page.getPages();
    }

    public List<T> getRows() {
        return rows;
    }

    public void setRows(List<T> rows) {
        this.rows = rows;
    }

    public long getTotal() {
        return total;
    }

    public void setTotal(long total) {
        this.total = total;
    }

}
